package com.jzr.board.ui.adapter.todaywork

import android.graphics.Color
import android.widget.RelativeLayout
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jzr.board.R
import com.jzr.board.bean.BoardGetBean.DataBean.NurseLevelSumsBean
import com.jzr.board.bean.BoardGetBean


class GeneralNurseServiceAdapter(data: MutableList<BoardGetBean.DataBean.CareLabelSumsBean>?) :
    BaseQuickAdapter<BoardGetBean.DataBean.CareLabelSumsBean, BaseViewHolder>(
        R.layout.item_genera_nurseservice,
        data
    ) {


    override fun convert(
        helper: BaseViewHolder?,
        item: BoardGetBean.DataBean.CareLabelSumsBean?
    ) {
        helper?.setText(R.id.tvTitle, item?.name)
        if(item?.beds!=null && item.beds.size !=0){
            val sb = StringBuffer()
            for (i in  item?.beds!!.withIndex()){
                  sb.append(i.value).append("床")
            }
            helper?.setText(R.id.tvName, sb.toString())
        }

    }


}